import { FormType, IMyFormProps } from '@/base-ui/base-form/type'
import { ActionDesc } from '@/global/constant'

const operationLogSearch: IMyFormProps = {
  desc: ActionDesc.OperationLogSearch,
  layout: { span: 7 },
  formConfig: {
    name: 'wrap',
    size: 'middle',
    labelAlign: 'right',
    labelCol: { flex: '80px', offset: 2 },
    colon: false
  },
  itemsConfig: [
    {
      type: FormType.Input,
      prop: 'logUrl', //必写的，唯一标识,因为name属性不一定全部都会有
      label: 'url路径',
      name: 'logUrl',
      input: {
        size: 'small',
        placeholder: '请输入请求的url'
      }
    },
    {
      type: FormType.Select,
      prop: 'logStatus',
      label: '请求状态',
      name: 'logStatus',
      select: {
        baseProps: {
          placeholder: '请选择请求状态',
          size: 'small'
        },
        options: [
          { value: 200, content: '成功' },
          { value: 500, content: '失败' }
        ]
      }
    },
    {
      type: FormType.Input,
      prop: 'createBy', //必写的，唯一标识,因为name属性不一定全部都会有
      label: '登录用户',
      name: 'createBy',
      input: {
        size: 'small',
        placeholder: '请输入登录用户'
      }
    },
    {
      type: FormType.DatePicker,
      prop: 'createTime',
      label: '创建时间',
      name: 'createTime',
      date_picker: {
        showTime: true,
        size: 'small'
      }
    }
  ]
}

export default operationLogSearch
